import { ADD_COUNT } from "../action/type"

const _state = {
  nums: 2,
  count: 1
}

export default (state = _state, { type, payload }) => {
  switch(type) {
    case ADD_COUNT:
      return {
        ...state,
        count: state.count + payload
      }
    default:
      return state
  }
}